JavaScript source The JavaScript source icon ( In this example double-clicking the script icon reveals the following code: function CSOpenAlert(action) { alert(action[1]); } The function name used in the script must be identical to that defined in the <csactionclass>. This function immediately calls the JavaScript alert method to display the alert box. The alert method takes a single parameter. By specifying action [1], you pass a value taken from the first data input field in your action--in this case, a "msg" box. In this way, all parameters defined by the <csactionparam> tag become arrays which can be referenced by their array number in any function. The first array, or action[0] (JavaScript is zero-based), refers to the function itself and should not be used. Thus, an action utilizing four parameters would use action[1] - action[4] to reference the parameters. Creating Actions > Creating your own actions > JavaScript source |